﻿using DataServer.ApplicationLib.Entities;
using DataServer.CommonLib.Models.DataConfig;

namespace DataServer.ApplicationLib.Controls
{
    public abstract class ControlBase
    {
        public abstract Tuple<bool, string, ControlBase> TryValidationCreatorControl(ConfigFieldEditRequestDto model);

        public abstract string Serialize();

        public abstract ControlBase Deserialize(string controlContent);

        public abstract void BuildEditDefineValue(ConfigFieldInfoResponseDto configFieldInfoDto);
    }

    public class ControlModelBase
    {
        public ConfigFieldEntity? TargetField { get; set; }

        public string? TargetFieldColumn { get; set; }
    }
}
